package com.coder.controller;

import com.coder.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("insertUser")
    public String insertUser(@RequestParam("name") String name ,@RequestParam("age") int age){

        int i = userService.insertUser(name,age);
        return "success";
    }
}
